package day06;

import java.util.Date;
import java.util.Stack;

public class P01ExceptionDemo extends Object {
    public static void main(String[] args) {
        Math math = null;//type value
        System.out.println(Math.sqrt(2));//static method
        System.out.println(math.sqrt(2));//
        Date date = null;
        //System.out.println(date.getTime());//NPE
        int x = 0;
        //System.out.println(1/x);//ArithmeticException
        int[] a = {1, 2, 3};
        //  System.out.println(a[3]);//ArrayIndexOutOfBoundsException
        Stack<Integer> S = new Stack<Integer>();
        System.out.println(S.peek());//EmptyStackException peek/pop
    }
}
